package com.znf4.good.free.server.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znf4.good.free.entity.Free;
import com.znf4.good.free.mapper.FreeMapper;
import com.znf4.good.free.server.FreeServer;

@Service
public class FreeServerImpl implements FreeServer {
	
	@Autowired
	private FreeMapper freeMapper ;
	
	

	public void addFreeGood(Free free) {
		freeMapper.insert(free);
		
	}

	public void updateFreeGood(Free free) {
		freeMapper.update(free);
		
	}

	public void delOneFreeGood(Free free) {
		freeMapper.deleteOne(free);
		
	}

	public void delAllFreeGood(List<Free> list) {
		freeMapper.deleteAll(list);
		
	}

	public Free queryOne(Free free) {
		return freeMapper.queryOne(free);
	}

	public List<Free> queryAll(Free free) {
		return freeMapper.queryAll(free);
	}
	
	
	
	
	

}
